package locale;

import java.util.Date;
import java.util.Locale;

import org.springframework.context.ApplicationContext;
//import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

public class Test {
	public static void main(String[] args) {
		test_locale();
	}
	
	public static void test_locale() {
		ApplicationContext ctx = new FileSystemXmlApplicationContext(
				"src/locale/locale.xml");

		Object[] objects = new Object[] { "Hello Tommy", new Date() };
		String message1 = ctx.getMessage("Time", objects, Locale.CHINA);
		String message2 = ctx.getMessage("Time", objects, Locale.US);
		System.out.println(message1);
		System.out.println(message2);
	}
}
